﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cashier_Model
{
    [Table(Tablename = "bill_repurchase")]
    public class BillRepurchase: BaseModel
    {
        private Int64 id;

        [Table(Columnname="id", Columntype="bigint", Iskey=true, Isupdatefield=true, Isdeletefield=true)]
        public Int64 Id
        {
            get { return id; }
            set { id = value; }
        }

        private String enterpriseNo;

        [Table(Columnname = "enterprise_no", Columntype = "varchar", Iscondition = true, Isdeletefield = true)]
        public String EnterpriseNo
        {
            get { return enterpriseNo; }
            set { enterpriseNo = value; }
        }

        private String storeNo;

        [Table(Columnname = "store_no", Columntype = "varchar", Iscondition = true)]
        public String StoreNo
        {
            get { return storeNo; }
            set { storeNo = value; }
        }

        private String repurchaseNo;

        [Table(Columnname = "repurchase_no", Columntype = "varchar", Iscondition = true)]
        public String RepurchaseNo
        {
            get { return repurchaseNo; }
            set { repurchaseNo = value; }
        }

        private String purchaseNo;

        [Table(Columnname = "purchase_no", Columntype = "varchar", Iscondition = true)]
        public String PurchaseNo
        {
            get { return purchaseNo; }
            set { purchaseNo = value; }
        }

        private Int32 numbers;

        [Table(Columnname = "numbers", Columntype="int", Isupdatefield=true)]
        public Int32 Numbers
        {
            get { return numbers; }
            set { numbers = value; }
        }

        private Decimal goodsTotal;

        [Table(Columnname = "goods_total", Columntype="decimal", Isupdatefield=true)]
        public Decimal GoodsTotal
        {
            get { return goodsTotal; }
            set { goodsTotal = value; }
        }

        private Decimal repurchaseTotal;

        [Table(Columnname = "repurchase_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal RepurchaseTotal
        {
            get { return repurchaseTotal; }
            set { repurchaseTotal = value; }
        }

        private Decimal fare;

        [Table(Columnname = "fare", Columntype = "decimal", Isupdatefield = true)]
        public Decimal Fare
        {
            get { return fare; }
            set { fare = value; }
        }

        private Decimal otherCost;

        [Table(Columnname = "other_cost", Columntype = "decimal", Isupdatefield = true)]
        public Decimal OtherCost
        {
            get { return otherCost; }
            set { otherCost = value; }
        }

        private Decimal countTotal;

        [Table(Columnname = "count_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal CountTotal
        {
            get { return countTotal; }
            set { countTotal = value; }
        }

        private Decimal returnCost;

        [Table(Columnname = "return_cost", Columntype = "decimal", Isupdatefield = true)]
        public Decimal ReturnCost
        {
            get { return returnCost; }
            set { returnCost = value; }
        }

        private DateTime repurchaseDate;

        [Table(Columnname = "repurchase_date", Columntype="datetime")]
        public DateTime RepurchaseDate
        {
            get { return repurchaseDate; }
            set { repurchaseDate = value; }
        }

        private String note;

        [Table(Columnname="note", Columntype="varchar")]
        public String Note
        {
            get { return note; }
            set { note = value; }
        }

        private bool? isRefund;

        [Table(Columnname = "is_refund", Columntype = "boolean", Isupdatefield = true)]
        public bool? IsRefund
        {
            get { return isRefund; }
            set { isRefund = value; }
        }

        private DateTime refundTime;

        [Table(Columnname = "refund_time", Columntype = "datetime", Isupdatefield=true)]
        public DateTime RefundTime
        {
            get { return refundTime; }
            set { refundTime = value; }
        }

        private String adminUsername;

        [Table(Columnname = "admin_username", Columntype = "varchar", Iscondition = true)]
        public String AdminUsername
        {
            get { return adminUsername; }
            set { adminUsername = value; }
        }

        private String adminName;

        [Table(Columnname = "admin_name", Columntype = "varchar", Iscondition = true)]
        public String AdminName
        {
            get { return adminName; }
            set { adminName = value; }
        }
        
        private DateTime createtime;

        [Table(Columnname = "createtime", Columntype = "datetime")]
        public DateTime Createtime
        {
            get { return createtime; }
            set { createtime = value; }
        }

        private String startDate;

        public String StartDate
        {
            get { return startDate; }
            set { startDate = value; }
        }

        private String endDate;

        public String EndDate
        {
            get { return endDate; }
            set { endDate = value; }
        }
    }
}
